/* 关注我/配置 */
import request from '@/utils/request';
import {object2Url} from "@/utils/trans";

// 分页查询关注
export async function accreditPage(data) {
  const res = await request.post('/business/MerchantManagement/getFollowMe', data);
  if (res.data.code === 2000) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.msg));
}

// 新增关注我
export async function saveFollowMe(data) {
  const res = await request.post('/business/MerchantManagement/saveFollowMe', data);
  if (res.data.code === 2000) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.msg));
}


// 删除关注
export async function accreditDel(data) {
  const res = await request.post('/business/MerchantManagement/deleteFollowMe', data);
  if (res.data.code === 2000) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.msg));
}

// 修改状态
export async function accreditUpdate(data) {
  const res = await request.post('/business/MerchantManagement/updateFollowMe', data);
  if (res.data.code === 2000) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.msg));
}
